<include file="public@head_top"/>
</head>
<body class="bgeee">
<include file="public@head"/>

<style>#top {box-shadow: none;border-bottom: 1px solid #ddd;}
	.checkout *,  .checkout *::before,  .checkout *::after {box-sizing: border-box;}.checkout{ background:#fff;}
.checkout{ margin-top:130px; margin-bottom:30px;}
	@media only screen and (max-width: 991px) {
		#footer{ padding-bottom: 62px;}
	}
    @media only screen and (max-width: 767px) {
		.bgeee{ background:#eee;}
		.checkout{ margin-top:90px;}
	}
.help-block{ margin-top:3px; color:#999;}
</style>
<link href="__TMPL__/public/assets/css/checkout2.css" rel="stylesheet" >
<link type="text/css" href="__TMPL__/public/assets/css/shop.css" rel="stylesheet" />
<style>
	.quentity input{
		width: 40px;
		padding: 5px 10px;
		text-align: center;
		border: 1px solid #e9e9e9;
		background: rgb(235, 235, 228);
	}
</style>
<link type="text/css" href="__TMPL__/public/assets/frontend/css/flow_done.css" rel="stylesheet" />
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <defs>
        <symbol id="icon-add" viewBox="0 0 32 32">
            <title>add2</title>
            <path class="path1" d="M15 17h-13.664c-0.554 0-1.002-0.446-1.002-1 0-0.552 0.452-1 1.002-1h13.664v-13.664c0-0.554 0.446-1.002 1-1.002 0.552 0 1 0.452 1 1.002v13.664h13.664c0.554 0 1.002 0.446 1.002 1 0 0.552-0.452 1-1.002 1h-13.664v13.664c0 0.554-0.446 1.002-1 1.002-0.552 0-1-0.452-1-1.002v-13.664z"></path>
        </symbol>
        <symbol id="icon-ok" viewBox="0 0 39 32">
            <title>ok</title>
            <path class="path1" d="M14.084 20.656l-7.845-9.282c-1.288-1.482-3.534-1.639-5.016-0.351s-1.639 3.534-0.351 5.016l10.697 12.306c1.451 1.669 4.057 1.623 5.448-0.096l18.168-22.456c1.235-1.527 0.999-3.765-0.528-5.001s-3.765-0.999-5.001 0.528l-15.573 19.337z"></path>
        </symbol>
        <symbol id="icon-edit" viewBox="0 0 32 32">
            <title>edit</title>
            <path class="path1" d="M25.599 11.292l-4.892-4.892 3.825-3.825 4.892 4.892-3.825 3.825zM4.732 23.308l3.959 3.959-5.939 1.98 1.98-5.939zM10.666 26.225l-4.892-4.892 13.425-13.425 4.892 4.892-13.425 13.425zM31.687 6.713l-6.4-6.4c-0.417-0.417-1.091-0.417-1.508 0l-20.267 20.267c-0.114 0.115-0.191 0.25-0.242 0.393-0.003 0.009-0.012 0.015-0.015 0.025l-3.2 9.6c-0.128 0.383-0.029 0.806 0.257 1.091 0.203 0.204 0.476 0.313 0.754 0.313 0.112 0 0.227-0.017 0.337-0.054l9.6-3.2c0.011-0.003 0.017-0.013 0.027-0.016 0.142-0.052 0.276-0.128 0.39-0.242l20.267-20.267c0.417-0.416 0.417-1.091 0-1.508v0z"></path>
        </symbol>
        <symbol id="icon-del" viewBox="0 0 26 32">
            <title>delete</title>
            <path class="path1" d="M17.723 28c0.543 0 0.984-0.448 0.984-1v-12c0-0.552-0.441-1-0.984-1s-0.985 0.448-0.985 1v12c0 0.552 0.441 1 0.985 1v0zM7.877 28c0.543 0 0.984-0.448 0.984-1v-12c0-0.552-0.441-1-0.984-1s-0.985 0.448-0.985 1v12c0 0.552 0.441 1 0.985 1v0zM12.8 28c0.543 0 0.985-0.448 0.985-1v-12c0-0.552-0.441-1-0.985-1s-0.984 0.448-0.984 1v12c0 0.552 0.441 1 0.984 1v0zM23.631 4h-5.908v-2c0-1.104-0.882-2-1.969-2h-5.908c-1.087 0-1.969 0.896-1.969 2v2h-5.908c-1.087 0-1.969 0.896-1.969 2v2c0 1.104 0.882 2 1.969 2v18c0 2.208 1.765 4 3.939 4h13.784c2.174 0 3.938-1.792 3.938-4v-18c1.087 0 1.969-0.896 1.969-2v-2c0-1.104-0.882-2-1.969-2v0zM9.846 3c0-0.552 0.441-1 0.984-1h3.938c0.544 0 0.985 0.448 0.985 1v1h-5.908v-1zM21.662 28c0 1.104-0.882 2-1.969 2h-13.784c-1.087 0-1.97-0.896-1.97-2v-18h17.723v18zM22.646 8h-19.692c-0.543 0-0.985-0.448-0.985-1s0.441-1 0.985-1h19.692c0.543 0 0.984 0.448 0.984 1s-0.441 1-0.984 1v0z"></path>
        </symbol>
        <symbol id="icon-clock" viewBox="0 0 32 32">
            <title>clock</title>
            <path class="path1" d="M29.333 16c0-7.364-5.97-13.333-13.333-13.333s-13.333 5.97-13.333 13.333c0 7.364 5.97 13.333 13.333 13.333s13.333-5.97 13.333-13.333v0 0 0 0 0 0zM0 16c0-8.837 7.163-16 16-16s16 7.163 16 16c0 8.837-7.163 16-16 16s-16-7.163-16-16zM14.667 14.667v1.333h2.667v-10.667h-2.667v9.333zM24 18.667h1.333v-2.667h-10.667v2.667h9.333z"></path>
        </symbol>
    </defs>
</svg>
<div class="wrap clearfloat checkout" style=" padding:20px;">
  <form method="POST" name="myform" action="/list108-cn.html?act=ordersubmit" target="_self">
  <div class="checkout-addr">
    <div class="checkout-title"><span>配送地址</span></div>
    <div class="addr-list-wrap">
      <div class="addr-list">
        <ul style="height:364px; overflow:hidden;">
          <foreach name="addresslist" key="key" item="vo">
          <li id="selectaddress{$vo.id}" class="<if condition="$vo.id == $taddress.id">check</if>" data-id="{$vo.id}" data-defok="{$vo.defok}">
            <dl class="add-select">
              <dt class="name">{$vo.name}</dt>
              <dd class="address"> {$vo.address}</dd>
              <dd class="tel">{$vo.tel}</dd>
            </dl>
            <div class="addr-opration addr-edit add-edit"><a href="javascript:;" class="addr-edit-btn" onClick="openaddressdiv();"><svg class="icon icon-edit">
              <use xlink:href="#icon-edit"></use>
              </svg></a></div>
            <div class="addr-opration addr-del delete"><a href="javascript:;" class="addr-del-btn"><svg class="icon icon-del">
              <use xlink:href="#icon-del"></use>
              </svg></a></div>
            <!---->
            <if condition="$vo.defok gt 0">
            <div class="addr-opration addr-default">默认地址</div>
            </if>
          </li>
          </foreach>
          <li class="addr-new add-new" onClick="openaddressdiv();">
            <div class="add-new-inner"><i class="icon-add"><svg class="icon icon-add">
              <use xlink:href="#icon-add"></use>
              </svg></i>
              <p>添加新地址</p>
            </div>
          </li>
        </ul>
        <div class="moreaddress">展开更多收货地址 >></div>
        <input type='hidden'  name="orderaddress" id="selectaddress" value="{$taddress.id}" />
      </div>
    </div>
    <script>
    $(".moreaddress").click(function(){
		  if($(this).prev().css("height")=="364px"){
			  $(this).prev().css("height","auto");
			  $(this).html("收起更多收货地址 >>");
		  }else{
			  $(this).prev().css("height","364px");
			  $(this).html("展开更多收货地址 >>");
		  }
	  });
    </script>
    <div class="checkout-title"><span>支付方式</span></div>
    <div class="shipping-method-wrap">
      <div class="shipping-method">
        <ul class="pay">
          <foreach name="configinfo['shoppayapi']" key="key" item="vo">
          <li data-id="{$vo.id}">
            <div class="name"><img src="{$vo.img}" /></div>
          </li>
          </foreach>
        </ul>
        <input name="payfs" type="hidden" id="payfs" value="">
      </div>
    </div>
    <div class="checkout-title"><span>配送方式</span></div>
    <div class="shipping-method-wrap">
      <div class="shipping-method">
        <ul class="psfs">
          <foreach name="configbase['shopconfig']['wllist']" key="key" item="vo">
          <li data-val="{$key}" data-money="{$vo[1]}">
            <div class="name">{$vo[0]}</div>
            <div class="price st-mt5">￥{$vo[1]}</div>
          </li>
          </foreach>
        </ul>
        <input name="psfs" id="psfs" type="hidden" value="">
      </div>
    </div>
    <div class="checkout-title"><span>商品清单</span></div>
    <div class="shipping-method-wrap">

		<style>
			.cart-item-shop{ display: table-header-group;}
			.cart-item-shop .item-price {color: #d1434a; }
			.cart-item-shop dl{ display: table-row; background: #f8f8f8;}
			.cart-item-shop dl dd{ display: table-cell; height: 45px; line-height: 45px; padding-left:15px; padding-right: 15px; border-bottom:1px solid #ddd;}
			.cart-item-shop dl dd.shop-tab-1{ border-left: 1px solid #e9e9e9;}
			.cart-item-shop dl dd.shop-tab-5{ border-right: 1px solid #e9e9e9;}
			@media only screen and (max-width: 991px) {
				.cart-item-shop {
					display: block;
				}
				.cart-item-shop dl{ display: block; background: #f8f8f8;}
				.cart-item-shop dl dd{ display: none;}
				.cart-item-shop dl dd.shop-tab-1{ display: block; border-left:none;}
				.cart-item-shop dl dd.shop-tab-5{ border-right:none;}
				.cart-item-list .item-include{ padding-left:22px;}
			}
		</style>
		<div class="item-list-wrap st-posr">
            <div class="cart-item">
                <div class="cart-item-head">
                    <ul>
                        <li>商品信息</li>
                        <li>商品金额</li>
                        <li>商品数量</li>
                        <li>总金额</li>
						<li>操作</li>
                    </ul>
                </div>
                
                <!--商品列表信息-->
				<foreach name="cartshoplist" key="k" item="v">
                	<notempty name="configinfo['supplierok']">
					  <div class="cart-item-shop">
						  <dl>
							  <dd class="shop-tab-1">店铺名称：{$v.shop_name}</dd>
							  <dd class="shop-tab-2"></dd>
							  <dd class="shop-tab-3"></dd>
							  <dd class="shop-tab-4"></dd>
							  <dd class="shop-tab-5"></dd>
						  </dl>
					  </div>
                      </notempty>
                <ul class="cart-item-list">
                  <foreach name="v.list" key="key" item="vo">
                  <li>
                    <div class="cart-tab-1">
                      <div class="cart-item-check">
                      </div>
                      <div class="cart-item-pic">
                        <a href="{:cmf_url('portal/Article/index',array('id'=>$vo['listid'],'cid'=>$vo['listcatid']))}" target="_blank" title="{$vo.goods_name}"><img class="goods-image" src="/upload/{$vo.goods_img}" widt="100" height="100" /></a>
                      </div>
                      <div class="cart-item-title">
                        <div class="item-name">
                          <a href="{:cmf_url('portal/Article/index',array('id'=>$vo['listid'],'cid'=>$vo['listcatid']))}" target="_blank" title="{$vo.goods_name}">{$vo.goods_name}</a>
                        </div>
						<p class="st-x-showmobile">价格：<font class="item-price">￥{$vo.price}</font></p>
                      </div>
                      <div class="item-include">
                        <dl>
                          <dd>
                          <foreach name="vo.goods_attr_arr" key="ks" item="vs">
                          {$ks}：{$vs} | 
                          </foreach>
                          </dd>
                        </dl>
                      </div>
                    </div>
                    <div class="cart-tab-2">
                      <div class="item-price">￥<span id="price_{$vo.id}">{$vo.price}</span></div>
                    </div>
                    <div class="cart-tab-3">
                      <div class="item-quantity">
                        <div class="select-self select-self-open">
                          <div class="quentity">
                            <input id='num_{$vo.id}' type="text" value="{$vo.number}" disabled="disabled">
                          </div>
                        </div>
                        <div class="item-stock"> 有货 </div>
                      </div>
                    </div>
                    <div class="cart-tab-4">
                      <div class="item-price-total">￥<span class="span_xiaoji" id="span_xiaoji_{$vo.id}"><php>echo round($vo['price'] * $vo['number'], 2);</php></span></div>
                    </div>
					<div class="cart-tab-5">
					  <div class="cart-item-opration"><a href="/list108-cn.html" class="btn btn-light">修改</a></div>
					</div>
                  </li>
                  </foreach>
                </ul>
				<notempty name="configinfo['supplierok']">
				  <style>
					  @media only screen and (max-width: 991px) {
						.shophdlist dl dd{height:55px; line-height: 1.5;}
					}
				  </style>
				  <div class="cart-item-shop st-texr shophdlist">
					  <dl style="background: #fff;">
						  <dd class="shop-tab-1 st-xd-mb15">
						  	<div class="st-posa st-right15 st-wid100">
								<foreach name="v.activitylist" key="key" item="vo">
									<span>{$vo.name}:</span>
									<span class="item-price">-￥{$vo.money}</span>
								</foreach>
							</div>
						  </dd>
						  <dd class="shop-tab-2"></dd>
						  <dd class="shop-tab-3"></dd>
						  <dd class="shop-tab-4"></dd>
						  <dd class="shop-tab-5"></dd>
					  </dl>
				  </div>
				  </notempty>
				</foreach>
				<div style="clear:both"></div>
                
            </div>
        </div>
    </div>
	
	<notempty name="memberusecouponlist">
      <style>.shopname{ background: #f8f8f8; padding:15px; border-bottom: 1px solid #ddd; margin-bottom:20px;}.ycouponlist a{ width:50%; float:left;}</style>
      <div class="checkout-title"><span>使用优惠券</span></div>
      <foreach name="memberusecouponlist" key="k" item="v">
	  <div class="shipping-method-wrap">
		  <notempty name="configinfo['supplierok']">
      	  <h3 class="shopname">店铺名称：{$v.shop_name}</h3>
		  </notempty>
		  <div id="ycouponlist{$v.id}" class="ycouponlist tab-active">
				<div class="st-x-showpc">
					<div class="couponlist">
						<foreach name="v.list" key="key" item="vo">
						<a href="javascript:;" class="aui-flex usecoupon usecoupon{$vo.id}" data-id="{$vo.id}" data-price="{$vo.yhmoney}">
							<div class="aui-price-nub">
								<div class="aui-digit">
									<h2><em>￥</em>{$vo.yhmoney}</h2>
								</div>
								<div class="aui-full">
									<p>满{$vo.tomoney}元可用</p>
								</div>
							</div>
							<div class="aui-flex-box">
								<h2>{$vo.name}</h2>
								<h3>有效期：{$vo.endtime|date='Y-m-d',###}</h3>
								<span class="hdbutton">确定使用</span>
								<div class="hdtype">活动类型：<if condition="$vo.hdtype == 1">指定商品优惠券<else>订单优惠券</if></div>
							</div>
						</a>
						</foreach>
						<div class="st-clear"></div>
					</div>
					<div class="morecoupon morecoupon{$v.id}"><h3 class="moretext"><span>更多优惠券 >></span></h3></div>
				</div>
				<div class="st-x-showmobile">
					<php>$i=0;</php>
					<foreach name="v.list" key="key" item="vo">
					<php>$i++;</php>
					<if condition="$i lt 3">
					<a href="javascript:;" class="aui-flex usecoupon usecoupon{$vo.id}" data-id="{$vo.id}" data-price="{$vo.yhmoney}">
						<div class="aui-price-nub">
							<div class="aui-digit">
								<h2><em>￥</em>{$vo.yhmoney}</h2>
							</div>
							<div class="aui-full">
								<p>满{$vo.tomoney}元可用</p>
							</div>
						</div>
						<div class="aui-flex-box">
							<h2>{$vo.name}</h2>
							<h3>有效期：{$vo.endtime|date='Y-m-d',###}</h3>
							<span class="hdbutton">确定使用</span>
							<div class="hdtype">活动类型：<if condition="$vo.hdtype == 1">指定商品优惠券<else>订单优惠券</if></div>
						</div>
					</a>
					</if>
					</foreach>
					<div class="st-clear"></div>
					<div class="morecouponmobile">
					  <h3 class="moretext"><span id="morecouponmobile{$v.id}" onClick="openclassstyle('youhuijuanBlock{$v.id}','st-hover');">更多优惠券>></span></h3>
					  <div class="st-hoverBlock st-ovev">
						  <div id="youhuijuanBlock{$v.id}" class="st-hoverflash">
							<div class="st-contentBox" style="line-height:1.5;">
								<div class="st-hoverflashB">
								  <foreach name="v.list" key="key" item="vo">
									<a href="javascript:;" class="aui-flex usecoupon usecoupon{$vo.id}" data-id="{$vo.id}" data-price="{$vo.yhmoney}">
										<div class="aui-price-nub">
											<div class="aui-digit">
												<h2><em>￥</em>{$vo.yhmoney}</h2>
											</div>
											<div class="aui-full">
												<p>满{$vo.tomoney}元可用</p>
											</div>
										</div>
										<div class="aui-flex-box">
											<h2>{$vo.name}</h2>
											<h3>有效期：{$vo.endtime|date='Y-m-d',###}</h3>
											<span class="hdbutton">确定使用</span>
											<div class="hdtype">活动类型：<if condition="$vo.hdtype == 1">指定商品优惠券<else>订单优惠券</if></div>
										</div>
									</a>
									</foreach>
									<div class="st-clear"></div>
								</div>
							</div>
						  </div>

						</div>
					</div>
				</div>
                <input name="couponids[]" id="couponid{$v.id}" type="hidden" value="">
			</div>
		</div>
        <script>
		$("#ycouponlist{$v.id} .usecoupon").click(function(){
			var selprice = 0;
			var id = $(this).data("id");
			// 移除已选中优惠券，累计优惠券金额
			$("#ycouponlist{$v.id} .usecoupon").each(function(){
				if($(this).hasClass("useok") == true){
					selprice = $(this).data("price");
				}
				$(this).removeClass("useok");
			});
			$(".usecoupon"+id).addClass("useok");
			$("#couponid{$v.id}").val($(this).data("id"));
			var couponprice = $("#shop_coupon").html();
			$("#shop_coupon").html(Number(couponprice) + selprice - $(this).data('price'));
			shoptotal(selprice);// 移除已选优惠券后加回优惠券金额
			shoptotal($(this).data("price"),"-");
			colseclassstyle('youhuijuanBlock','st-hover');
		});
		$("#morecouponmobile{$v.id}").click(function(){
			event.stopPropagation();
		});
        $(document).click(function(event){
			var _con = $('#youhuijuanBlock{$v.id}');  // 设置目标区域
			if(!_con.is(event.target) && _con.has(event.target).length === 0){
			   colseclassstyle('youhuijuanBlock{$v.id}','st-hover');
			}
		});
		$(".morecoupon{$v.id}").click(function(){
			  if($(this).prev().css("height")=="254px"){
				  $(this).prev().css("height","auto");
				  $(this).find("span").html("收起优惠券 >>");
			  }else{
				  $(this).prev().css("height","254px");
				  $(this).find("span").html("更多优惠券 >>");
			  }
		  });
        </script>
        </foreach>
      </notempty>
      
      <if condition="empty($integralgoodsgroup)">
      <div class="checkout-title"><span>其它信息</span></div>
	  <div class="shipping-method-wrap">
		  <div class="st-dataBlock">
			<div class="st-formBlock st-tableBlock">
			<table>
			  <tr>
				<th class="st-wid15">使用积分</th>
				<td><input id="useintegral" name="useintegral" type="text" style="width:250px;" value="0" onChange="setuseintegral()" />
				<p class="help-block">您当前的可用积分为：{$configmember['score']} 积分，本订单最多可以使用{$integralnumber} 积分.</p>
				</td>
			  </tr>
			  <tr>
				<th>订单备注</th>
				<td><textarea name="postdesc" cols="80" rows="3" placeholder="请输入当前订单留言备注信息"></textarea></td>
			  </tr>
			</table>
			</div>
		  </div>
	  </div>
      </if>
      
      <style>
	  .totalprice{ font-size:16px;}
      </style>
	  <div class="shipping-method-wrap">
		  <div class="totalprice st-texr">
			  <div class="st-mt10">
				<span>原价总金额：</span>
				<span>￥{$shopoldtotalprice}</span>
			  </div>
			  <div class="st-mt10">
				<span>商品总金额：</span>
				<span>￥{$shoptotalprice}</span>
			  </div>
			  <foreach name="activitylist" key="key" item="vo">
			  <div class="st-mt10 st-colh">
				<span>{$vo.name}：</span>
				<span>-￥{$vo.money}</span>
			  </div>
			  </foreach>
			  <notempty name="memberusecouponlist">
			  <div class="st-mt10 st-colh">
				<span>使用优惠券：</span>
				<span>-￥<span id="shop_coupon">0.00</span></span>
			  </div>
			  </notempty>
			  <if condition="empty($integralgoodsgroup)">
			  <div class="st-mt10 status-text-yellow">
				<span>积分抵扣：</span>
				<span>-￥<span id="shop_integraldk">0.00</span></span>
			  </div>
			  </if>
			  <div class="st-mt10 status-text-yellow">
				<span>运费：</span>
				<span>+￥<span id="shop_yunfei">0.00</span></span>
			  </div>
			  <div class="st-mt10">
				<b class="st-fon18">应付总额：</b><span class="st-fon18 st-colh">￥<span id="shop_zong">{$activityprice}</span></span>
			  </div>
			  <if condition="!empty($integralgoodsgroup) && $integralgoodsgroup['integralgoods'] eq 1">
			  <div class="st-mt10">
				<b class="st-fon18">使用积分：</b><span class="st-fon18 st-colh">{$integralgoodsgroup['integralprice']}积分</span>
			  </div>
			  </if>
		  </div>
	  </div>
	  
    <div class="next-btn-wrap"><input name="submit" type='submit' value='提交订单' class="st-btn st-btn-red st-curp" onClick="return checkorder();"/></div>
  </div>
  </form>
</div>

<div id="showAddressBlock" class="st-detailBlock">
<div style="position:absolute; width:100%; height:100%">
  <div class="st-detailBox st-borbox" style="transform: translateY(0%) scale(0.9); position:absolute; height:90%; left:25%; width:50%;">
  <h3 class="st-titBox">收货信息</h3>
  <div class="st-contentBlock" style="height: 88%!important;overflow-y: auto!important; margin-top:15px;">

    <div class="contactlist">                
        <foreach name="addresslist" key="key" item="vo">
        <div class="contact_form <if condition="$vo.defok == 1">cur</if>" data-id="{$vo.id}" data-defok="{$vo.defok}" id="contactaddress{$vo.id}">
          <i class="delete">×</i>
          <h3>联系人姓名:<span class="name">{$vo.name}</span></h3>
          <p class="first">联系电话:<span class="tel">{$vo.tel}</span></p>
          <p style="margin-top:5px; height:48px; overflow:hidden; line-height:1.5;"><label>联系地址:</label><span class="address">{$vo.address}</span></p>
          <a href="javascript:;" class="add-select" style="right:90px;">选择</a>
          <a href="javascript:;" class="add-edit" style="right:50px;">修改</a>
          <a href="javascript:;" class="def-select">默认</a>
        </div>
        </foreach>
    </div>
    
    <div class="contact_form2 st-formBlock st-form38">
      <form id="formcontact" method="post">
      <div class="inputBox"><label>收货人姓名</label><div class="input"><input type="text" id="addname" name="name" style="width:80%;" /></div></div>
      <div class="inputBox"><label>联系电话</label><div class="input"><input type="text" id="addtel" name="tel" style="width:80%;" /></div></div>
      <div class="inputBox"><label>收货人地址</label><div class="input"><textarea type="text" id="addaddress" name="address" style="width:100%;"></textarea></div></div>
      <div class="inputBox"><label>默认地址</label><div class="input"><input type="radio" id="adddefault1" name="defok" value="1" /> 是 <input type="radio" id="adddefault2" name="defok" checked="checked" value="0" /> 否</div></div>
      <div class="inputBox"><input id="contactid" type="hidden" value="" /><input type="button" class="st-btn st-btn-orange addressbut" id="addcontact" value="提交信息" style="margin-left:20%; width:150px; height:45px; line-height:45px;" />
      <input type="button" class="st-btn st-btn-white addressbut add-new" value="添加新地址" style="margin-left:10px; width:150px; height:45px; line-height:45px;" />
      </div>
      <div class="st-clear"></div>
      </form>
    </div>
  </div>
  <a href="javasrcipt:;" onClick="colseaddressdiv();" class="st-closeBox">X</a>
  </div>
  </div>
</div>
<include file="public@footer"/>
<script type="text/javascript" src="__TMPL__/public/assets/frontend/js/flow_done.js"></script> 
<script>
$(".pay li").click(function(){
	$(".pay li").each(function(){
		$(this).removeClass("check");
	});
	$(this).addClass("check");
	$("#payfs").val($(this).data("id"));
});
$(".psfs li").click(function(){
	$(".psfs li").each(function(){
		$(this).removeClass("check");
	});
	$(this).addClass("check");
	$("#psfs").val($(this).data("val"));
	$("#shop_yunfei").html($(this).data("money"));
	shoptotal($(this).data("money"));
});
// 使用积分抵扣
function setuseintegral(){
	var thisintegral = Number('{$configmember[score]}');
	var maxintegral = Number('{$integralnumber}');
	var yuseintegral = Number($('#shop_integraldk').html());
	var useintegralnumber = Number($('#useintegral').val());
	var useintegralmoney = useintegralnumber / Number("{$configbase['shopconfig']['integralratio']}");
	
	// 判断使用积分是否是数字
	if(!$.isNumeric(useintegralnumber)){
		$('#useintegral').val(0);
		return false;
	}
	
	// 积分余额判断
	if(useintegralnumber <= thisintegral && useintegralnumber <= maxintegral){
		$('#shop_integraldk').html(useintegralmoney);
		shoptotal(yuseintegral,'+');// 加回已使用积分
		shoptotal(useintegralmoney,'-');// 扣除当前使用积分
	}else{
		// 最大积分判断
		if(useintegralnumber > Number(thisintegral)){
			var message = "您当前积分余额不足";	
		}else{
			var message = "积分抵扣不得超过"+maxintegral;
		}
		Wind.use("noty", function () {
			noty({
				text: message,
				type: "error",
				layout: "center"
			});
		});
		$('#useintegral').val(0);
		$('#shop_integraldk').html(0);
	}
}
function shoptotal(otherfee,action){
	var total = $("#shop_zong").html();
	if(action == "-") {
		var ordertotal = Number(total) - Number(otherfee);
	}else{
		var ordertotal = Number(total) + Number(otherfee);
	}
	$("#shop_zong").html(ordertotal.toFixed(2)); 
}
function checkorder(){
	var payok = false;
	$(".pay li").each(function(){
		if($(this).is('.check') != false){
			payok = true;
		}
	});
	if(payok == false){
		Wind.use("noty", function () {
			noty({
				text: "请选择一个支付方式",
				type: "error",
				layout: "center"
			});
		});
		event.preventDefault();
		return false;	
	}
	var psfs = false;
	$(".psfs li").each(function(){
		if($(this).is('.check') != false){
			psfs = true;
		}
	});
	if(psfs == false){
		Wind.use("noty", function () {
			noty({
				text: "请选择一个配送方式",
				type: "error",
				layout: "center"
			});
		});
		event.preventDefault();
		return false;	
	}
	return true;
}
</script>
</body>    
</html>